When writing routes, set class to map type instead of user so that duplicate waypoint...
authorrobertl <robertl>
Wed, 20 Jan 2010 12:40:53 +0000 (12:40 +0000)
committerrobertl <robertl>
Wed, 20 Jan 2010 12:40:53 +0000 (12:40 +0000)
garmin.c
jeeps/gpsapp.c
jeeps/gpsmem.c

index 6714e82a8a7310d5a9f58c90fd6cf31af8fee36b..f7f47d4ad52b87e4d0fe5b75a4bb21b7e7e57429 100644 (file)
--- a/garmin.c
+++ b/garmin.c
@@ -769,7 +769,7 @@ sane_GPS_Way_New(void)
        way->cross_road[0] = 0;
        way->cross_road[0] = 0;
        way->dpth = 1.0e25f;
-       way->wpt_class = 0;
+       way->wpt_class = 0;  // user waypoint by default.
 
        return way;
 }
@@ -966,6 +966,9 @@ route_waypt_pr(const waypoint *wpt)
        rte->lat = wpt->latitude;
        rte->smbl = gt_find_icon_number_from_desc(wpt->icon_descr, PCX);
 
+        // map class so unit doesn't duplicate routepoints as a waypoint.
+       rte->wpt_class = 0x80;  
+
        if (wpt->altitude != unknown_alt) {
                rte->alt = wpt->altitude;
        } else {
index 93f7d8caaa4a9eb1c276ad5ff85fb14b91184daa..81ef74c908c9fcbf4b3efaded404c3e55a078025 100644 (file)
@@ -2220,7 +2220,7 @@ static void GPS_D109_Send(UC *data, GPS_PWay way, int32 *len, int protoid)
     p = data;
 
     *p++ = 1; /* data packet type; must be 1 for D109 and D110 */
-    *p++ = 0; // way->wpt_class;
+    *p++ = way->wpt_class;   
 
     *p++ = ((way->dspl & 3) << 5) | 0x1f;      /* colour & display */
 
index 47b3be3297f3fd80503a0e686fd33516b80154a8..e9ae4a3ecb7fe8ac995abfd8a53e3fd16af0b2dd 100644 (file)
@@ -271,13 +271,10 @@ GPS_PWay GPS_Way_New(void)
     ret->dst = 0;
     ret->smbl = ret->dspl = ret->colour = ret->alt = ret->prot = INT_MAX;
 
-    if(gps_waypt_type==pD108)
-    {
-       ret->dst  = 0;
-       ret->attr = 0x60;
-       for(i=0;i<7;++i) ret->subclass[i] = 0;
-       for(i=6;i<18;++i) ret->subclass[i] = 0xff;
-    }
+    ret->dst  = 0;
+    ret->attr = 0x60;
+    for(i=0;i<7;++i) ret->subclass[i] = 0;
+    for(i=6;i<18;++i) ret->subclass[i] = 0xff;
         
     return ret;
 }